﻿using EM.OA.BLL;
using EM.OA.DataModel.DBModel;
using EM.OA.WebCommon.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Web;
namespace EM.OA.Portal.Models
{
	public class MeetingRoomApplyModels : BaseViewModel
	{
      		/// <summary>
		/// ID
        	/// </summary>		
		[Display(Name = "ID")]
        	public Guid? MeetingRoomApplyID { get; set; }

        
			/// <summary>
		/// 会议室ID
        	/// </summary>		
		[Display(Name = "会议室ID")]
        public Guid? MeetingRoomID { get; set; }

        public string MeetingRoomName
        {
            get
            {
                return new MeetingRoomBLL().GetEntity(MeetingRoomID).MeetingRoomName;
            }
        }
			/// <summary>
		/// 申请人
        	/// </summary>		
		[Display(Name = "申请人")]
        public Guid? ApplyUserID { get; set; }

        public string ApplyUserName 
        {
            get
            {
                if (ApplyUserID == new Guid())
                    return "admin";
                else
                    return new UserBLL().GetEntity(ApplyUserID).UserName;
            }
        }
			/// <summary>
		/// 申请人电话
        	/// </summary>		
		[Display(Name = "申请人电话")]
        	public string ApplyUserPhone { get; set; }        
			/// <summary>
		/// 申请部门
        	/// </summary>		
		[Display(Name = "申请部门")]
        	public Guid ApplyDepartmentID { get; set; }        
			/// <summary>
		/// 会议内容
        	/// </summary>		
		[Display(Name = "会议内容")]
        	public string MeetingContent { get; set; }        
			/// <summary>
		/// 参会人数
        	/// </summary>		
		[Display(Name = "参会人数")]
        public int? MeetingPersonals { get; set; }        
			/// <summary>
		/// 会议开始时间
        	/// </summary>		
		[Display(Name = "会议开始时间")]
        public DateTime? StartTime { get; set; }

        [Display(Name="会议日期")]
        public DateTime? MeetingDate { get; set; }
        public string StartTime2 { get; set; }
        public string EndTime2 { get; set; }
			/// <summary>
		/// 会议结束时间
        	/// </summary>		
		[Display(Name = "会议结束时间")]
        public DateTime? EndTime { get; set; }        
			/// <summary>
		/// 申请时间
        	/// </summary>		
		[Display(Name = "申请时间")]
        public DateTime? ApplyDateTime { get; set; }        
			/// <summary>
		/// 审批人
        	/// </summary>		
		[Display(Name = "审批人")]
        public Guid? ApprovalUserID { get; set; }        
			/// <summary>
		/// 审批备注
        	/// </summary>		
		[Display(Name = "审批备注")]
        	public string ApprovalRemark { get; set; }        
			/// <summary>
		/// 审批时间
        	/// </summary>		
		[Display(Name = "审批时间")]
        public DateTime? ApprovalTime { get; set; }        
			/// <summary>
		/// 状态
        	/// </summary>		
		[Display(Name = "状态")]
        public byte? Status { get; set; }        
		   
	}
}